package com.speed.service;

import java.sql.SQLException;

import com.jfinal.aop.Before;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.IAtom;
import com.jfinal.plugin.activerecord.tx.Tx;
import com.speed.entity.User;

public class UserService {

	public User findUser(User user) {
		User user2 = User.MODEL_DAO
				.findFirst(
						"select " + User.USER_NAME + ","+User.PASSWORD+" FROM " + User.TABLE_NAME + " where " + User.USER_NAME
								+ " = ? and " + User.PASSWORD + " = ? ",
						new Object[] { user.get(User.USER_NAME), user.get(User.PASSWORD) });
		return user2;
	}
	
}
